<?php
class RadErrorCode {
    //convention [modulecode 3 characters][error code 3 digits]
    const COMMON_ERROR          =   "RAD_001";
    const TYPE_NOT_SUPPORTED    =   "RAD_002";
    const STATUS_NOT_DELETED    =   "RAD_003";
    const TICKET_NOT_EXIST      =   "RAD_004";
    const QUEUE_TYPE_NOT_SUPPORTED  =   "RAD_005";
    const QUEUE_ITEM_NOT_EXIST      =   "RAD_006";
    const UPLOAD_IMAGE_FAIL         =   "RAD_007";
    const TICKET_HAS_ITEM_DONE      =   "RAD_008";

    public static function getErrorMess($errCode, $input1=null,$input2=null,$input3=null,$input4 = null) {
        switch ($errCode) {
            case RadErrorCode::COMMON_ERROR:
                return L10nHelper::_("Execute task fail");
            case RadErrorCode::TYPE_NOT_SUPPORTED:
                return L10nHelper::_("Radiology type is currently not supported");
            case RadErrorCode::STATUS_NOT_DELETED:
            	return L10nHelper::_("Assignment with status in_progress or done could not be deleted");
            case RadErrorCode::TICKET_NOT_EXIST:
            	return L10nHelper::_("The radiology ticket does not exist");
            case RadErrorCode::QUEUE_TYPE_NOT_SUPPORTED:
                return L10nHelper::_("Radiology queue type is not supported");
            case RadErrorCode::QUEUE_ITEM_NOT_EXIST:
                return L10nHelper::_("Radiology queue item does not exist");
            case RadErrorCode::UPLOAD_IMAGE_FAIL:
                return L10nHelper::_("Image uploading fail");
            case RadErrorCode::TICKET_HAS_ITEM_DONE:
                return L10nHelper::_("Could not cancel ticket which have some items done");
            default:
                ;
                break;
        }

    }
}
?>